<template>
	<view style="padding-bottom:80rpx;">
		<bs-navbar title='我的信息'></bs-navbar>
		<GrForm v-if='vipType==1' :form='form'></GrForm>
		<QyForm v-if='vipType==0' :form='form'></QyForm>
	</view>
</template>

<script>
	import GrForm from './components/grForm.vue'
	import QyForm from './components/qyForm.vue'
	export default {
		components: {
			GrForm,
			QyForm
		},
		data() {
			return {
				form: {},
				vipType: null
			};
		},
		async onLoad() {
			this.vipType = this.cache.getCache('userMsg').userType
			const userCode = this.cache.getCache('userCode')
			let selectMyVip = await this.$u.api.selectMyVip({
				page: 1,
				pageSize: 20,
				userCode: userCode,
			})
			if (selectMyVip.length != 0) {
				let form = await this.$u.api.showVipForm({
					declareId: selectMyVip[0].declareId
				})
				form.applyCategory = JSON.parse(form.applyCategory).join('/')
				this.form = form
				console.log(form, '查询会员申报状态')
			}
		}
	}
</script>

<style lang="scss">
</style>
